package com.demo.service.impl;

import com.demo.dao.CourseDao;
import com.demo.dao.StudentDao;
import com.demo.dao.impl.CourseDaoImpl;
import com.demo.dao.impl.StudentDaoImpl;
import com.demo.entity.Course;
import com.demo.entity.Student;
import com.demo.service.StudentService;

import java.io.Serializable;
import java.util.Map;

public class StudentServiceImpl implements StudentService {

    @Override
    public void add(Student vo) {
        //你看这个对象是哪个
        StudentDao studentDao = new StudentDaoImpl();
        studentDao.add(vo);
    }

    @Override
    public void delete(long id) {
        StudentDao studentDao = new StudentDaoImpl();

        studentDao.delete(id);

    }

    @Override
    public void update(Student vo) {
        StudentDao studentDao = new StudentDaoImpl();

        studentDao.update(vo);

    }

    @Override
    public Student get(Serializable id) {
        StudentDao studentDao = new StudentDaoImpl();
        return studentDao.get(id);
    }

    @Override
    public Map<String, Object> list(Map<String, Object> params) {
        StudentDao studentDao = new StudentDaoImpl();
        return studentDao.list(params);
    }
}